<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - Mode normal - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Mode: normal</h2>

<h4>Syntax</h4>

<p><code>atomsk &#60;inputfile&#62; [options] &#60;outputfile&#62;</code></p>

<p><code>atomsk &#60;inputfile&#62; [options] &#60;formats&#62;</code></p>

<p><code>atomsk &#60;inputfile&#62; [options] &#60;prefix&#62; &#60;formats&#62;</code></p>


<h4>Description</h4>

<p>This mode is the default. In this mode, Atomsk reads one &#60;inputfile&#62;, applies options if any, and writes the final result into one or several &#60;outputfile&#62;.</p>

<p>If an &#60;outputfile&#62; name is given with a recognisable extension (for instance "file.xyz", or "system.cfg"), then Atomsk will write it into the appropriate format.</p>

<p>If no output file name is given, but one or several &#60;format&#62; are given (among <a href="./formats.html">those supported by Atomsk</a>), then Atomsk will use the name of the input file, and replace its extension with the one appropriate for each &#60;format&#62;.</p>

<p>If a &#60;prefix&#62; is given (i.e. a file name with no extension), followed by one or several &#60;formats&#62;, then Atomsk will use the prefix to produce all the output files according to the &#60;formats&#62;.</p>

<p>Atomsk checks for the existence of the files given in the command-line. If only one file exists, then Atomsk considers it as the input file, and considers the other file name as the output file, regardless of the ordering of the file names in the command. If both files exist, then Atomsk prompts which one should be used as input file, and asks if the output file should be overwritten. If you wish to avoid these questions, it is recommended to delete the output file(s) before running Atomsk, and/or to use the <a href="./progbe_ig.html">option <code>-ignore</code></a> or the <a href="./progbe_ow.html">option <code>-overwrite</code></a>.</p>

<p>Using options is not mandatory. If the command-line contains one or several options, then they are applied sequentially, in the order specified in the command line, after reading the intput file, and before writing the output file. Please refer to the <a href="./options.html">documentation about options</a>.</p>

<p>Note that in this mode, Atomsk accepts only one input file name, and one output file name (and possibly one or several formats). If more than two file names are specified, only the first two names are used, and other file names are ignored. As a result, you should never use a wildcard (i.e. the star symbol *) to specify file names, like "atomsk *.xyz cfg". If you wish to convert many input files, please use the mode <a href="./mode_filelist.html">File list</a>.</p>

<p>Note that contrary to other modes, you do not have to write "<code>--normal</code>" to use the normal mode, since it is the default mode.</p>


<h4>Examples</h4>

<ul>
<li><code class="command">atomsk mysystem.gin example.cfg</code>
<p>This will convert the file <code>mysystem.gin</code> into <code>example.cfg</code>.</p></li>

<li><code class="command">atomsk example.cfg mysystem.gin</code>
<p>Same as previous example, assuming the file <code>mysystem.gin</code> exists and <code>example.cfg</code> does not. The program recognizes which file exists, and which file has to be created. If both files already exist, you will be prompted which one to use as an input file.</p></li>

<li><code class="command">atomsk mysystem.gin cfg</code>
<p>This will convert the file <code>mysystem.gin</code> into <code>mysystem.cfg</code>.</p></li>

<li><code class="command">atomsk mysystem.gin new_system cfg xsf</code>
<p>This example uses a prefix (<code>new_system</code>) and several output formats. It will convert the file <code>mysystem.gin</code> into <code>new_system.cfg</code> and <code>new_system.xsf</code>.</p></li>

<li><code class="command">atomsk xsf new_system cfg mysystem.gin</code>
<p>Same as previous example. Note that command-line parameters can be specified in any order.</p></li>

<li><code class="command">atomsk unitcell.xyz -duplicate 2 2 6 -shift above 6.5 z 0.2 0.6 0.0 stackingfault.xsf</code>
<p>This example uses several options. The file <code>unitcell.xyz</code> will be read, then the system will be <a href="./option_duplicate.html">duplicated</a> to a 2x2x6 supercell, then part of the system will be <a href="./option_shift.html">shifted</a>, and the resulting system will be written to <code>stackingfault.xsf</code>.</p></li>

</ul>

<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
